/**
 * Created by 银信数据科技 on 2018/2/27.
 */
// import dva from 'dva';
export default {//解析路由定义路由
  namespace:'products',
  state:[],
  reducers: {
    'delete'(state,{payload: id }){//删除id为该值的目标 修改state的状态
      return state.filter(item => item.id !== id);
    },
    'change'(state,{payload:record}){
      record.name="改改";
      return [...state]
    }
  }
}
